﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：AsyncTaskResult.cs
// 功能描述：TongTongMall.RabbitMq
// 
// Create User：jym 2017/02/09
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TongTongMall.RabbitMq.IO
{
    /// <summary>
    /// Queue 返回状态
    /// </summary>
    public class AsyncTaskResult
    {
        /// <summary>
        /// 队列状态返回默认内容
        /// </summary>
        public readonly static AsyncTaskResult Success = new AsyncTaskResult(AsyncTaskStatus.Success, null);

        /// <summary>
        /// 返回状态
        /// </summary>
        public AsyncTaskStatus Status { get; private set; }

        /// <summary>
        /// 错误消息
        /// </summary>
        public string ErrorMessage { get; private set; }

        public AsyncTaskResult(AsyncTaskStatus status, string errorMessage)
        {
            Status = status;
            ErrorMessage = errorMessage;
        }
    }
}
